package entity;

import java.io.Serializable;

public class Passage implements Serializable {
    private static final long serialVersionUID = 1389357906737L;

    private Integer passageId;//文章id唯一，做数据库主键
    private String title;//文章标题
    private String content;//文章内容
    private String createDate;//文章发布时间
    private Integer count;//文章浏览次数
    private Integer operator;//文章作者、编辑者,id指明
    private Integer field;//文章所属栏目id
    private Integer course;//文章所属学科
    private int status;//1:已发布 2:等待审核 3:未通过审核
    private int roof;//是否置顶 0：不置顶 1:置顶

    public Passage(){}

    public Passage(Integer passageId, String title, String content, String createDate, Integer count, Integer operator,
                   Integer field, Integer course, int status, int roof){
        this.passageId = passageId;
        this.title = title;
        this.content = content;
        this.createDate = createDate;
        if(count != null)
            this.count = count;
        else
            this.count = 0;
        this.operator = operator;
        this.field = field;
        this.course = course;
        this.status = status;
        this.roof = roof;
    }

    public Integer getPassageId() {
        return passageId;
    }

    public void setPassageId(Integer newId) {
        this.passageId = newId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getCreateDate() {
        return createDate;
    }

    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Integer getOperator() {
        return operator;
    }

    public void setOperator(Integer operator) {
        this.operator = operator;
    }

    public Integer getField() {
        return field;
    }

    public void setField(Integer field) {
        this.field = field;
    }

    public Integer getCourse() {
        return course;
    }

    public void setCourse(Integer course) {
        this.course = course;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public boolean isRoof(){ return roof == 1;}

    public void setRoof(int roof) {
        this.roof = roof;
    }



}
